package com.qcby.form;

import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Min;
import java.util.List;

@Data
public class TOrderCreateForm {
    @NotNull(message = "收货地址不能为空")
    private Integer addressId;
    
    @NotNull(message = "订单商品不能为空")
    private List<OrderItemForm> items;
    
    @Data
    public static class OrderItemForm {
        @NotNull(message = "商品ID不能为空")
        private Integer productId;
        
        @NotNull(message = "商品规格ID不能为空")
        private Integer specificationId;
        
        @NotNull(message = "商品数量不能为空")
        @Min(value = 1, message = "商品数量必须大于0")
        private Integer quantity;
    }
} 